<?php


include "./lib/src/skey.php";

$images_url = base_url('images');
$admin_url = base_url('otakkanan');

$nama = $this->session->userdata('uname');

$sosial_stat = $this->adminmodel->get_social_network($uid);

$fb_stat = "<a href='$admin_url/scplugin?sc=fb'>Hubungkan?</a>";
$gp_stat = "<a href='$admin_url/scplugin?sc=gp'>Hubungkan?</a>";


if($sosial_stat !== FALSE)
{
	foreach($sosial_stat AS $sc_stat)
	{
		if(!empty ($sc_stat->sid) && $sc_stat->app == "fb")
		{
			$fb_stat = "<img alt='Terhubung' src='$images_url/ceklist.gif' style='height:20px' /> <a href='$admin_url/scplugin?sc=fb'>Telah Terhubung</a>";
		}
		
		if(!empty ($sc_stat->sid) && $sc_stat->app == "gp")
		{
			$gp_stat = "<img alt='Terhubung' src='$images_url/ceklist.gif' style='height:20px' /> <a href='$admin_url/scplugin?sc=gp'>Telah Terhubung</a>";
		}
	}
}

$isipage = "
	<div id='content2'>
			
			<div class='isicontent2'>
				<h3>Selamat Datang</h3>
				<img class='pcc' alt='Logo Dadan Network' src='$images_url/logoo.png' style='width:20%'>
				  
				  <br>
				  <p>
					Hai <b>$nama</b>, Assalamualaikum warohmatullohiwabarokatuh selamat datang di halaman adinistrasi. 
					Jangan lupa membaca doa sebelum melakukan aktivitas hari ini. 
					Semoa Alloh selalu Meridhoi amalan kita Amin.<br><br>
					Dadan Setia
				  </p>
			</div>
			
			<div class='isicontent2'>
					<h3>Login Alternatif</h3>
							<p>&nbsp; Permudah Akses akun anda. Sambungkan akun anda dengan akun Social Network.</p>
							<br />
					<table>
						<tbody>
							
							<tr>
								<td class='left'>
									Facebook  
								</td>
								<td class='right'>
									$fb_stat
								</td>
							</tr>
							<tr>
								<td class='left'>
									Google+ 
								</td>
								<td class='right'>
									$gp_stat
								</td>
							</tr>
						</tbody>
					</table>
					
			</div>
			
				
	</div>
";


$data['isi_page'] =$isipage;
$data['site_title'] = 'Halaman Administrator - Dadan Network';
$data['base_url'] = base_url();
$data['tahun_sekarang'] = date("Y");
$data['map_dir'] = '';

$this->parser->parse('template/admin', $data);

/* End of file index.php */
/* Location: ./application/views/admin/index.php */
